class ItemStatisticController < ApplicationController
	
	def create
		statistic = ItemStatistic.find_by_item_id(params[:item_id])
		if statistic
			statistic.update_attributes(:total_ad_click => statistic.total_ad_click + 1)
		else
			statistic = ItemStatistic.new
			statistic.item_id = params[:item_id]
			statistic.total_ad_click = 1
			statistic.save!
		end
		render :text => "ok"
	end
end
